package cate.common.game.trace.entity;

import cate.common.game.trace.GameTraceUtils;
import easy.mysql.map.anno.MyColumn;
import easy.mysql.map.anno.MyTable;
import lombok.ToString;

import javax.persistence.GenerationType;
import java.util.Date;

@ToString
@MyTable(table = RolePowerChangeLog.TABLE, generationType = GenerationType.AUTO, comment = "主角战力改变记录")
public class RolePowerChangeLog {

    public static final String TABLE = "role_power_change_log";

    @MyColumn(comment = "主角ID")
    public String roleId;

    @MyColumn(comment = "战力")
    public long power;

    @MyColumn(comment = "时间戳", description = "SQLite:INTEGER")
    public Date ts;

    public static String initSql() {
        return GameTraceUtils.sql(TABLE);
    }
}
